﻿Namespace Choreography
    Public Class MotorRabbitActivity
        Inherits RabbitActivityBase

#Region "Member Fields"
        Private _ear As EarEnum
        Private _earRotation As EarRotationEnum
        Private _angleOfEar As UInt32
#End Region

#Region "Properties"
        Public Property Ear() As EarEnum
            Get
                Return _ear
            End Get
            Set(ByVal value As EarEnum)
                _ear = value
            End Set
        End Property
        Public Property EarRotation() As EarRotationEnum
            Get
                Return _earRotation
            End Get
            Set(ByVal value As EarRotationEnum)
                _earRotation = value
            End Set
        End Property
        Public Property AngleOfEar() As UInt32
            Get
                Return _angleOfEar
            End Get
            Set(ByVal value As UInt32)
                _angleOfEar = value
            End Set
        End Property
#End Region

#Region "Constructors"
        Public Sub New()

        End Sub

        Public Sub New(ByVal actionMoment As UInt32, ByVal ear As EarEnum, ByVal angleOfEar As UInt32, ByVal earRotation As EarRotationEnum)
            Me.ActionMoment = actionMoment
            Me.Ear = ear
            Me.AngleOfEar = angleOfEar
            Me.EarRotation = earRotation
        End Sub
#End Region

#Region "Overrides"
        Public Overrides Function GetCommandString() As String
            Return System.String.Format("{0},motor,{1},{2},0,{3}", MyBase.ActionMoment, CInt(Me.Ear), Me.AngleOfEar, CInt(Me.EarRotation))
        End Function
#End Region

#Region "Enumerations"
        Public Enum EarEnum
            Right = 0
            Left = 1
        End Enum

        Public Enum EarRotationEnum
            Frontward = 0
            Backward = 1
        End Enum
#End Region

    End Class
End Namespace